package com.szqhyxj.youxiangju.biz.equipmentActivation.buySlots;

import com.szqhyxj.youxiangju.sys.BaseResult;
import com.szqhyxj.youxiangju.sys.RetrofitFacade;

import io.reactivex.Observable;
import retrofit2.Retrofit;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by leung on 2018/11/9.
 */

public class BuySlotModel {
    private interface BuySlotservice {
        @FormUrlEncoded
        @POST("posDevicePort/activatePortPay")
        Observable<BaseResult<String>> slotpay(
                @Field("devNo") String devno,
                @Field("payType") String payType,
                @Field("portNums") int nums
        );

    }

    public static Observable<BaseResult<String>> getSlotpay(String devno, String paytype,int nums) {
        return RetrofitFacade.Companion.getRetrofit().create(BuySlotservice.class).slotpay(
                devno,
                paytype,
                nums
        );
    }
}
